/*globals $, document, localStorage*/
$.moreddit = {
    loading: false,
    state : null,
    prevTop: 0
};
if (typeof localStorage.moreddit !== 'undefined') {
    var style = $("<style id='rreInitStyle'></style");
    $.moreddit.state = localStorage.moreddit;
    switch($.moreddit.state){
        case 'min':
            style.text("#header-bottom-left, .side, .footer-parent{display:none;}");
            break;
            case 'content':
            style.text("#header, .side, .footer-parent{display:none;}");
            break;

        default:
            break;
    }
    
    if (style.text() !== ""){
        $(document.documentElement).prepend(style);
    }

    $.moreddit.loading = false;
}
